package com.example.back.mapper;

import com.example.back.entity.Browse;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
@Mapper
public interface BrowseMapper {
    @Insert("insert into browse(postId,userId) values(#{postId},#{userId})")
    int addBrowse(Integer postId,Integer userId);

    @Select("select * from browse where postId = #{postId} AND userId = #{userId}")
      Browse queryBrowse(Integer postId,Integer userId);

}
